package com.zhanglu.fun.services.website.common;

import java.io.Serializable;

/**
 * @description controller返回结果集
 * @author zhanglu
 * @date 2017/6/11 16:30
 */
public class ResultResponse<T> implements Serializable {
    private boolean success;
    private String  message;
    private T       data;

    public ResultResponse(boolean success, String message, T data) {
        this.success = success;
        this.message = message;
        this.data = data;
    }

    public ResultResponse(T data) {
        this.success = true;
        this.message = null;
        this.data = data;
    }

    public ResultResponse(boolean success, T data) {
        this.success = success;
        this.data = data;
        this.message = null;
    }

    public ResultResponse() {
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
